package sellComputer;

public class Computer {
	private String name;
	
	public IntelCpu intelCpu;
	
	public KingstonMem kingstonMem;
	
	public SeagateHD seagateHd;
	
	public GigabyteMB gigabyteMb;

	public Object amdCpu;
	
	
	
	public Computer (String name,IntelCpu intelCpu,KingstonMem kingstonMem,SeagateHD seagateHd,GigabyteMB gigabyteMb) {
		this.name = name;
		this.intelCpu = intelCpu;
		this.kingstonMem = kingstonMem;
		this.seagateHd = seagateHd;
		this.gigabyteMb = gigabyteMb;
	}
	

	
	
	
	public int totalMoney(Computer computer) {
		int total = 0;
		total += computer.intelCpu.getPrice();
		total += computer.kingstonMem.getPrice();
		total += computer.seagateHd.getPrice();
		total += computer.gigabyteMb.getPrice();
		return total;
	}
	
	public void printTotalMoney(Computer computer) {
		System.out.println(computer.totalMoney(computer));
	}
	
	public String getName() {
		return name;
	}

	public void sayWork(Computer computer) {
		computer.intelCpu.work();
		computer.kingstonMem.work();
		computer.seagateHd.work();
		computer.gigabyteMb.work();
	}

	public String getIntelCpu() {
		return intelCpu.getName();
	}


	public String getKingstonMem() {
		return kingstonMem.getName();
	}


	public String getSeagateHd() {
		return seagateHd.getName();
	}


	public String getGigabyteMb() {
		return gigabyteMb.getName();
	}

	
	public void sayModule(Computer computer) {
		System.out.println(computer.getIntelCpu());
		System.out.println(computer.getKingstonMem());
		System.out.println(computer.getSeagateHd());
		System.out.println(computer.getGigabyteMb());
		
	}
	
}
